<!--<xsl:for-each select="root/bean/dbtable/column[@primaryKey!='Yes']">,<xsl:value-of select="@name" />="#local.menu.<xsl:value-of select="@name" />#"</xsl:for-each>
	
xsl:for-each select="root/bean/dbtable/column[@primaryKey!='Yes']"> or local.menu.<xsl:value-of select="@name" /> neq local.thisMenu.<xsl:value-of select="@name" /></xsl:for-each>

	-->&lt;cffunction name="insert<xsl:value-of select="//bean/@name"/>" access="public" output="false" returntype="numeric"&gt;
		<xsl:for-each select="root/bean/dbtable/column[@primaryKey!='Yes']">&lt;cfargument name="<xsl:value-of select="@name" />" type="string" default="<xsl:if test="@name = 'CreatedOn'">#now()#</xsl:if><xsl:if test="@name = 'Created_On'">#now()#</xsl:if><xsl:if test="@name = 'IsDeleted'">false</xsl:if><xsl:if test="@name = 'isDeleted'">false</xsl:if><xsl:if test="@name = 'CreatedBy'">#session.userserialid#</xsl:if><xsl:if test="@name = 'Created_By'">#session.userserialid#</xsl:if><xsl:if test="@name = 'EnterpriseID'">#client.enterpriseID#</xsl:if>" /&gt;
		</xsl:for-each>&lt;cfset var local = structNew() /&gt;
	
		&lt;cfquery name="local.insert<xsl:value-of select="//bean/@name"/>" datasource="#request.datasource#"&gt;
			INSERT INTO <xsl:value-of select="//dbtable/@name" />
				(
					<xsl:for-each select="root/bean/dbtable/column[@primaryKey!='Yes']"><xsl:value-of select="@name" /><xsl:if test="position() != last()">,
					</xsl:if>
					</xsl:for-each>
				)
			VALUES
				(
					<xsl:for-each select="root/bean/dbtable/column[@primaryKey!='Yes']">&lt;cfqueryparam value="<xsl:if test="@cfSqlType = 'cf_sql_money'">#replace(replace(arguments.<xsl:value-of select="@name" />,'$','','all'),',','','all')#</xsl:if><xsl:if test="@cfSqlType != 'cf_sql_money'">#arguments.<xsl:value-of select="@name" />#</xsl:if>" CFSQLType="<xsl:value-of select="@cfSqlType" />"<xsl:if test="@cfSqlType = 'cf_sql_varchar' and @length != '-1'"> maxLength="<xsl:value-of select="@length" />"</xsl:if><xsl:if test="@required != 'Yes'"><xsl:if test="@cfSqlType = 'cf_sql_timestamp'"> null="#not isDate(arguments.<xsl:value-of select="@name" />)#"</xsl:if><xsl:if test="@cfSqlType != 'cf_sql_timestamp'"> null="#not len(arguments.<xsl:value-of select="@name" />)#"</xsl:if></xsl:if> /&gt;<xsl:if test="position() != last()">,
					</xsl:if>
					</xsl:for-each>
				)
			select newID = scope_identity()
		&lt;/cfquery&gt;
		
		&lt;cfreturn local.insert<xsl:value-of select="//bean/@name"/>.newid /&gt;
	&lt;/cffunction&gt;